// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
// http请求
import VueResource from 'vue-resource'
import CuText from './components/common/CuText'
import Rside from './components/common/Rside'
import router from './router'
// markdown 高亮显示
// import Hljs from 'highlight.js'
// markdown编辑器
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'

Vue.use(VueResource)
Vue.use(mavonEditor)
Vue.config.productionTip = false
// Vue.prototype.$baseUrl = process.env.REST_URL
Vue.component('CuText', CuText)
Vue.component('Rside', Rside)
// Vue.directive('highlightjs', {
//   update: function (el) {
//     let blocks = el.querySelectorAll('pre code')
//     Array.prototype.forEach.call(blocks, Hljs.highlightBlock)
//   }
// })
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: {App},
  template: '<App/>'
})
